/* 数字人展示页面样式 */
.digital-showcase {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 60%, rgba(0, 170, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 85% 40%, rgba(0, 255, 200, 0.12) 0%, transparent 50%),
    linear-gradient(135deg, #0a1b3e 0%, #0d2a5e 50%, #041a34 100%);
  font-family: 'Arial', sans-serif;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

/* 全页边框装饰（图片一） */
.digital-showcase::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  pointer-events: none;
  background: url('/images/num-frame.png') no-repeat center top;
  background-size: min(1400px, 94vw) auto;
  z-index: 4;
}

/* 顶部导航栏 */
.top-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 30px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 10;
}

/* 顶部芯片操作栏（居中） */
.chip-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 10, 30, 0.35);
  border: 1px solid rgba(0, 200, 255, 0.25);
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: inset 0 0 0 1px rgba(0,255,255,0.08), 0 4px 12px rgba(0,0,0,0.25);
}

.chip {
  border: 1px solid rgba(0, 200, 255, 0.35);
  color: #dff6ff;
  background: linear-gradient(180deg, rgba(20,40,80,0.7), rgba(10,20,45,0.6));
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s ease;
}

.chip:hover { box-shadow: 0 0 10px rgba(0,255,255,0.35); transform: translateY(-1px); }
.chip.primary { background: linear-gradient(90deg, rgba(0,255,255,0.25), rgba(255,0,255,0.25)); border-color: rgba(64,160,255,0.6); }

/* 居中品牌和右侧动作区 */
.brand-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.right-actions {
  position: absolute;
  right: 30px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.assistant-tip {
  position: relative;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.9);
}

.assistant-tip .tip-tail {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: rgba(255,255,255,0.1);
  border-right: 1px solid rgba(255,255,255,0.2);
  border-top: 1px solid rgba(255,255,255,0.2);
}

.nav-left .logo {
  text-align: left;
}

.logo-text {
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 2px;
}

.logo-english {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: #00ffff;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.user-icon {
  width: 35px;
  height: 35px;
  background: linear-gradient(45deg, #00ffff, #ff00ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.avatar-icon {
  font-size: 18px;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

/* 主要内容区域 */
.main-content {
  display: flex;
  height: calc(100vh - 120px);
  position: relative;
}

/* 左侧贴边人物区域 */
.left-avatar {
  width: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 10px;
}

/* 左侧控制面板 */
.left-panel {
  width: 300px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.control-panel {
  background: rgba(40, 40, 40, 0.8);
  border-radius: 10px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.control-panel h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #ffffff;
  text-align: center;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-group label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.animation-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  padding: 8px;
  color: #ffffff;
  font-size: 14px;
}

.animation-select:focus {
  outline: none;
  border-color: #00ffff;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* 数字人模型 */
.digital-human-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.digital-human {
  width: 200px;
  height: 400px;
  position: relative;
  perspective: 1000px;
}

.human-model {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotateX(0deg); }
  50% { transform: translateY(-10px) rotateX(2deg); }
}

.human-body {
  width: 100%;
  height: 100%;
  position: relative;
}

/* 头部 */
.head {
  width: 60px;
  height: 80px;
  background: linear-gradient(145deg, #f0f0f0, #d0d0d0);
  border-radius: 50% 50% 45% 45%;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.face {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.expression {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: relative;
}

.expression.angry {
  background: #ff4444;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.expression.happy {
  background: #44ff44;
  box-shadow: 0 0 10px rgba(68, 255, 68, 0.5);
}

.expression.sad {
  background: #4444ff;
  box-shadow: 0 0 10px rgba(68, 68, 255, 0.5);
}

.expression.neutral {
  background: #888888;
  box-shadow: 0 0 10px rgba(136, 136, 136, 0.5);
}

.expression.excited {
  background: #ff8844;
  box-shadow: 0 0 10px rgba(255, 136, 68, 0.5);
}

/* 身体 */
.body {
  width: 80px;
  height: 120px;
  background: linear-gradient(145deg, #8B4513, #A0522D);
  border-radius: 10px;
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.suit {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #654321, #8B4513);
  border-radius: 8px;
  position: relative;
}

/* 手臂 */
.arms {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 40px;
}

.arm {
  width: 20px;
  height: 60px;
  background: linear-gradient(145deg, #f0f0f0, #d0d0d0);
  border-radius: 10px;
  position: absolute;
  top: 0;
}

.arm.left {
  left: 0;
  transform: rotate(-20deg);
}

.arm.right {
  right: 0;
  transform: rotate(20deg);
}

/* 腿部 */
.legs {
  position: absolute;
  top: 180px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 100px;
}

.leg {
  width: 25px;
  height: 80px;
  background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
  border-radius: 12px;
  position: absolute;
  top: 0;
}

.leg.left {
  left: 5px;
}

.leg.right {
  right: 5px;
}

/* 视频播放区域 */
.video-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 40px;
}

.video-container {
  width: 100%;
  max-width: 760px;
  position: relative;
  z-index: 2;
}

.video-player {
  background: rgba(0, 0, 0, 0.8);
  border: 2px solid #3b82f6; /* 蓝色边框 */
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.15), 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* 霓虹外框，靠近截图的蓝色高亮边框 */
.neon-frame {
  position: relative;
}

.neon-frame::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(0,255,255,0.0), rgba(0,255,255,0.6), rgba(0,255,255,0.0));
  filter: blur(6px);
  z-index: 0; /* 放在最底层作为发光背景 */
}

/* 视频边框图片覆盖层（如图） */
.neon-frame::after {
  content: '';
  position: absolute;
  pointer-events: none;
  inset: -6px; /* 外扩一点贴合边 */
  background: url('/images/num-video-frame.png') center/contain no-repeat;
  z-index: 2; /* 高于视频，但低于按钮 */
}

.video-content {
  height: 420px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1; /* 低于装饰边框，以免边框压在下层 */
}

/* 视频聊天遮罩层（覆盖视频与弹幕） */
.video-overlay-chat {
  position: absolute;
  inset: 0;
  /* 更低不透明度，确保视频清晰可见 */
  background: radial-gradient(60% 60% at 50% 40%, rgba(8,16,36,0.42), rgba(4,10,24,0.52));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10; /* 高于 .video-controls(z-index:7) */
  border-radius: 0; /* 覆盖整个 .video-player，由父容器裁剪圆角 */
  overflow: hidden;
}

.chat-panel {
  width: min(640px, 92%);
  height: min(360px, 80%);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(12,22,55,0.95), rgba(8,16,40,0.95));
  border: 1px solid rgba(97, 158, 255, 0.35);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(0,255,255,0.06);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(97, 158, 255, 0.25);
  color: #cfe3ff;
  font-size: 14px;
}

.chat-close {
  background: transparent;
  border: 1px solid rgba(97,158,255,0.45);
  color: #e7f0ff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  overflow: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Transparent scrollbar styling for chat overlay */
.chat-messages {
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.chat-messages::-webkit-scrollbar {
  width: 8px;
  background: transparent;
}
.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  border: 2px solid transparent; /* creates gap so it feels lighter */
  background-clip: padding-box;
}
.chat-messages:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
}

.chat-msg {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  max-width: 88%;
}
.chat-msg.user { align-self: flex-end; background: #23408f; color: #fff; }
.chat-msg.assistant { align-self: flex-start; background: rgba(255,255,255,0.08); color: #e7f0ff; border: 1px solid rgba(97,158,255,0.25); }

/* 打字机效果光标 */
.typing-cursor {
  display: inline-block;
  margin-left: 2px;
  color: #61a0ff;
  font-weight: bold;
  animation: blink-cursor 1s infinite;
}

@keyframes blink-cursor {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(64,120,255,0.25);
}
.chat-input-row input {
  flex: 1;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0 10px;
}
.chat-input-row button {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(97, 158, 255, 0.35);
  background: #2b4fb8;
  color: #fff;
  cursor: pointer;
}
.chat-input-row button[disabled] { opacity: 0.6; cursor: default; }

/* Chat upload buttons and progress */
.chat-upload-btns {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.upload-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
}
.upload-icon-img { width: 18px; height: 18px; display: block; pointer-events: none; }
.upload-icon:disabled {
  opacity: 0.6;
  cursor: default;
}
.upload-icon.asr-recording {
  background: rgba(255, 80, 80, 0.3);
  border-color: rgba(255, 120, 120, 0.6);
  color: #ff8080;
  animation: pulse-recording 1.5s ease-in-out infinite;
}
.upload-progress {
  min-width: 48px;
  text-align: center;
  height: 34px;
  line-height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: #cfe3ff;
  font-size: 12px;
  padding: 0 8px;
}

/* Chat message attachments */
.chat-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.chat-attachment {
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
}
.chat-attachment-img {
  max-width: 160px;
  max-height: 120px;
  display: block;
}
.chat-attachment-file {
  display: inline-block;
  padding: 6px 8px;
  color: #e7f0ff;
  text-decoration: none;
}

/* Pending attachments (before send) */
.pending-attachments {
  padding: 8px 10px;
  border-top: 1px dashed rgba(64,120,255,0.35);
}
.pending-title {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
}
.chat-attachment { position: relative; }
.pending-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.4);
  color: #e7f0ff;
  cursor: pointer;
  line-height: 18px;
  text-align: center;
}

/* 弹幕层 */
.danmaku-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 4; /* 高于视频与overlay 控件之下可按需调整 */
}

/* 弹幕项本身可以接收点击事件 */
.danmaku-layer .danmaku-item {
  pointer-events: auto;
}

.danmaku-item {
  position: absolute;
  left: 100%;
  white-space: nowrap;
  color: #fff;
  font-size: 14px;
  text-shadow: 0 0 6px rgba(0,0,0,0.6);
  padding: 2px 8px;
  background: rgba(0,0,0,0.25);
  border-radius: 12px;
  animation: danmakuMove 10s linear forwards;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

/* 鼠标悬停时暂停弹幕动画并显示删除按钮 */
.danmaku-item:hover {
  animation-play-state: paused !important;
  background: rgba(0,0,0,0.4);
  cursor: pointer;
}

.danmaku-text {
  flex: 1;
}

.danmaku-delete {
  background: rgba(255, 0, 0, 0.6);
  border: none;
  color: #fff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex; /* 保持flex布局 */
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0; /* 默认完全透明，但保持布局 */
  visibility: hidden; /* 隐藏但不占位 */
  transition: opacity 0.2s ease, visibility 0.2s ease;
  flex-shrink: 0;
}

.danmaku-item:hover .danmaku-delete {
  opacity: 1;
  visibility: visible;
}

.danmaku-delete:hover {
  background: rgba(255, 0, 0, 0.8);
}

/* 暂停状态下暂停弹幕动画 */
.video-player.paused .danmaku-item {
  animation-play-state: paused;
}

/* 弹幕输入区域 */
.danmaku-input-container {
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 10px;
  align-items: center;
  position: relative;
  z-index: 8;
}

.danmaku-input {
  flex: 1;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  outline: none;
}

.danmaku-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.danmaku-input:focus {
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

.danmaku-send-btn {
  height: 32px;
  padding: 0 16px;
  border: 1px solid rgba(0, 255, 255, 0.4);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(0, 200, 255, 0.2));
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.danmaku-send-btn:hover {
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.3), rgba(0, 200, 255, 0.3));
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.4);
  transform: translateY(-1px);
}

@keyframes danmakuMove {
  0% { 
    transform: translateX(0); 
    opacity: 1; 
  }
  2% { 
    opacity: 1; 
  }
  100% { 
    transform: translateX(calc(-100% - 300px)); 
    opacity: 1; 
  }
}

/* iframe 自适应填充 */
.video-embed {
  position: absolute;
  inset: 0;
}

.video-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 4px;
}

/* HTML5 video 覆盖容器 */
.video-tag {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.video-fallback-link {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  background: rgba(0,0,0,0.35);
  padding: 6px 10px;
  border-radius: 6px;
}

.video-title {
  font-size: 24px;
  font-weight: bold;
  color: #ffffff;
  margin-bottom: 10px;
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.video-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  z-index: 3; /* 高于边框 */
}

.play-button {
  width: 80px;
  height: 80px;
  background: linear-gradient(45deg, #00ffff, #ff00ff);
  border: none;
  border-radius: 50%;
  font-size: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.play-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.8);
}

.video-controls {
  padding: 15px;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative; /* 使 z-index 生效 */
  z-index: 7; /* 高于覆盖层，确保不被遮挡 */
}

.play-control{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
}
.play-control:hover{ box-shadow: 0 0 10px rgba(0,255,255,0.35); }

.progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  position: relative;
}

.progress {
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, #00ffff, #ff00ff);
  border-radius: 2px;
}

.time-display {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.control-buttons {
  display: flex;
  gap: 10px;
}

.control-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  cursor: pointer;
  padding: 5px;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.control-btn.active {
  background: rgba(0, 255, 255, 0.2);
  color: #00ffff;
  box-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

/* 浮动左上角工具条 */
.floating-toolbar {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 180px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 10px;
  z-index: 11;
}

/* 绿色操作选择（左上角） */
.floating-toolbar.green {
  width: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 60, 20, 0.35);
  border: 1px solid rgba(0, 255, 120, 0.35);
  border-radius: 999px;
  padding: 6px 10px;
}
.floating-toolbar.green .toolbar-label { font-size: 12px; color: #c9ffd9; }
.floating-toolbar.green .toolbar-select {
  background: rgba(0, 120, 60, 0.35);
  border: 1px solid rgba(0, 255, 120, 0.45);
  color: #eafff0;
  padding: 6px 8px;
  border-radius: 999px;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.toolbar-label {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
}

.toolbar-select {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
}

/* 背景装饰 */
.background-decoration {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
}

.watermark {
  position: absolute;
  top: 20%;
  right: 10%;
  font-size: 48px;
  color: rgba(255, 255, 255, 0.1);
  font-weight: bold;
  transform: rotate(-15deg);
}

.watermark-en {
  position: absolute;
  bottom: 30%;
  left: 5%;
  font-size: 24px;
  color: rgba(255, 255, 255, 0.08);
  font-weight: bold;
  transform: rotate(10deg);
}

.data-streams {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.stream {
  position: absolute;
  width: 2px;
  height: 100px;
  background: linear-gradient(180deg, transparent, #00ffff, transparent);
  animation: streamFlow 3s linear infinite;
}

.stream:nth-child(1) {
  left: 20%;
  animation-delay: 0s;
}

.stream:nth-child(2) {
  left: 50%;
  animation-delay: 1s;
}

.stream:nth-child(3) {
  left: 80%;
  animation-delay: 2s;
}

@keyframes streamFlow {
  0% { transform: translateY(-100px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}

/* 底部交互面板 */
.bottom-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 12;
  pointer-events: none; /* 仅中间徽章和右侧按钮可交互 */
}

/* 居中蓝色弧形平台 */
.bottom-panel::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  width: min(820px, 80vw);
  height: 70px;
  background:
    radial-gradient(60% 120% at 50% 20%, rgba(64,140,255,0.55), rgba(64,140,255,0.12) 70%, transparent 80%),
    linear-gradient(180deg, rgba(8,20,55,0.9), rgba(6,14,40,0.9));
  border: 1px solid rgba(64,140,255,0.45);
  border-top: 1px solid rgba(140,200,255,0.6);
  box-shadow: 0 -6px 30px rgba(0,60,160,0.35), inset 0 8px 20px rgba(120,180,255,0.18);
  border-radius: 24px 24px 0 0;
  clip-path: path('M10,70 C160,10 660,10 810,70 L810,70 L0,70 Z');
  pointer-events: none;
}

.interaction-center { display: flex; align-items: center; justify-content: center; pointer-events: auto; }

.glowing-orb { width: 58px; height: 58px; position: relative; animation: orbPulse 2.2s ease-in-out infinite; filter: drop-shadow(0 0 16px rgba(80,180,255,0.6)); }

.orb-core { width: 100%; height: 100%; background: radial-gradient(60% 60% at 40% 35%, #a9d8ff, #4fb1ff 55%, #2a67ff 100%); border-radius: 50%; position: absolute; inset: 0; border: 2px solid rgba(180,220,255,0.8); }

.orb-ring { width: 120%; height: 120%; border: 2px solid rgba(120, 200, 255, 0.55); border-radius: 50%; position: absolute; top: -10%; left: -10%; animation: ringRotate 3.6s linear infinite; box-shadow: 0 0 18px rgba(120,200,255,0.5) inset; }

@keyframes orbPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes ringRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.action-buttons { position: absolute; right: 40px; bottom: 26px; display: flex; gap: 12px; pointer-events: auto; }

.action-btn { width: 40px; height: 40px; background: rgba(255,255,255,0.08); border: 1px solid rgba(200, 220, 255, 0.25); border-radius: 50%; color: #d8e6ff; font-size: 16px; cursor: pointer; transition: all 0.25s ease; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,0.35); }
.action-btn:hover {
  background: rgba(120, 180, 255, 0.22);
  border-color: rgba(160, 200, 255, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(20, 60, 160, 0.35);
}

.action-btn.primary {
  background: linear-gradient(45deg, rgba(0,255,255,0.2), rgba(255,0,255,0.2));
  border-color: rgba(0,255,255,0.4);
}

.action-btn.active {
  background: rgba(255, 80, 80, 0.3);
  border-color: rgba(255, 120, 120, 0.6);
  color: #ff8080;
  animation: pulse-recording 1.5s ease-in-out infinite;
}

@keyframes pulse-recording {
  0%, 100% { 
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  }
  50% { 
    box-shadow: 0 6px 18px rgba(0,0,0,0.35), 0 0 20px rgba(255, 80, 80, 0.6);
  }
}

.ai-assistant {
  display: flex;
  align-items: center;
}

.assistant-btn {
  background: linear-gradient(45deg, #00ffff, #ff00ff);
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.assistant-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 255, 255, 0.4);
}

.bell {
  font-size: 16px;
  animation: bellShake 2s ease-in-out infinite;
}

@keyframes bellShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .left-avatar { width: 260px; }
  
  .digital-human {
    width: 150px;
    height: 300px;
  }
  
  .video-title {
    font-size: 20px;
  }
  
  .video-subtitle {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    height: auto;
  }
  
  .left-avatar { width: 100%; padding: 10px 0; }
  
  .control-panel {
    flex: 1;
  }
  
  .digital-human-container {
    flex: 1;
  }
  
  .video-section {
    padding: 20px;
  }
  
  .bottom-panel {
    flex-direction: column;
    height: auto;
    padding: 15px;
    gap: 15px;
  }
  
  .action-buttons {
    order: 2;
  }
  
  .ai-assistant {
    order: 3;
  }
}

/* AI chat dock */
.ai-chat-dock {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 360px;
  max-height: 50vh;
  display: flex;
  flex-direction: column;
  background: rgba(10, 18, 36, 0.9);
  border: 1px solid rgba(64, 120, 255, 0.35);
  border-radius: 12px;
  overflow: hidden;
  z-index: 20;
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.ai-messages {
  padding: 10px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-msg {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  max-width: 88%;
}

.ai-msg.user {
  align-self: flex-end;
  background: #23408f;
  color: #fff;
}

.ai-msg.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: #e7f0ff;
  border: 1px solid rgba(97, 158, 255, 0.25);
}

.ai-input {
  display: flex;
  gap: 8px;
  padding: 10px;
  
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(64, 120, 255, 0.25);
}

.ai-input input {
  flex: 1;
  height: 34px;
  border-radius: 8px;
  
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0 10px;
}

.ai-input button {
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(97, 158, 255, 0.35);
  background: #2b4fb8;
  color: #fff;
  cursor: pointer;
}

.ai-input button[disabled] {
  opacity: 0.6;
  cursor: default;
}

/* Floating Action Button for AI panel */
.ai-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(97, 158, 255, 0.45);
  background:
    radial-gradient(circle at 30% 30%, rgba(0,255,255,0.25), transparent 60%),
    linear-gradient(180deg, rgba(20,40,90,0.85), rgba(10,20,45,0.85));
  color: #e7f0ff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45), 0 0 20px rgba(64,120,255,0.2);
  backdrop-filter: blur(8px);
}

.ai-fab:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,0.55), 0 0 28px rgba(64,120,255,0.35);
  transform: translateY(-1px);
}

/* Sci-fi AI panel */
.ai-panel {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 380px;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(8,14,30,0.92), rgba(8,14,30,0.88));
  border: 1px solid rgba(64, 120, 255, 0.45);
  border-radius: 14px;
  overflow: hidden;
  z-index: 40;
  box-shadow:
    inset 0 0 0 1px rgba(0, 255, 255, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.45),
    0 0 30px rgba(64,120,255,0.25);
  backdrop-filter: blur(10px);
}

.ai-panel::before {
  content: '';
  position: absolute;
  inset: -10px;
  background: radial-gradient(60% 40% at 80% 0%, rgba(0, 255, 255, 0.25), transparent 60%);
  filter: blur(18px);
  z-index: -1;
}

.ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(18,36,86,0.6), rgba(10,22,52,0.5));
  border-bottom: 1px solid rgba(64,120,255,0.35);
}

.ai-title {
  font-size: 14px;
  color: #cfe3ff;
  letter-spacing: 0.5px;
}

.ai-close {
  background: transparent;
  border: 1px solid rgba(97,158,255,0.45);
  color: #e7f0ff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
}

.ai-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ai-panel .ai-messages {
  background: linear-gradient(180deg, rgba(10,20,45,0.35), rgba(10,20,45,0.2));
  border-bottom: 1px solid rgba(64,120,255,0.2);
}

.ai-panel .ai-input {
  background: rgba(0,0,0,0.35);
}

@media (max-width: 768px) {
  .ai-panel { right: 12px; left: 12px; width: auto; }
  .ai-fab { right: 12px; bottom: 12px; }
}